{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import random"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "a = random.random()\n",
    "b = random.random()\n",
    "c = random.random()\n",
    "d = random.random()\n",
    "e = random.random()\n",
    "f = random.random()\n",
    "\n",
    "g = random.random()\n",
    "h = random.random()\n",
    "i = random.random()\n",
    "j = random.random()\n",
    "\n",
    "\n",
    "A = np.array([[a,b],[c,d],[0,f]])\n",
    "B = np.array([[g,h],[i,j]])\n",
    "\n",
    "X = A.dot(B.dot(A.T))\n",
    "\n",
    "R =np.diag([0.01,0.01,0.01])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7.82792738e+16,  9.83364006e+16,  1.06213145e+17],\n",
       "       [ 9.83364006e+16, -1.23532670e+17, -1.33427636e+17],\n",
       "       [ 1.06213145e+17, -1.33427636e+17, -1.44115188e+17]])"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.linalg.inv(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9034056533860128"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
